<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection" />
    <meta content="emai=no" name="format-detection" />
    <link rel="stylesheet" type="text/css" href="/willbe/css/swiper.min.css">
    <link rel="stylesheet" type="text/css" href="/willbe/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/willbe/css/result.css" />
    <script src="/willbe/js/zepto-1.1.6.js" type="text/javascript"></script>
    <script src="/willbe/js/common.js" type="text/javascript"></script>
    <title>测试结果</title>
</head>
<body>
    <header>
    	<div class="user">
    		<span><?php echo $user['nickname']?></span>
    	</div>
        <img data-href="/activity/coupon" class="d-avatar" src="<?php echo $description['icon']?>" />
        <div>
            <img class="d-willbe" src="/willbe/img/d_willbe.png" />
            <span id="result"><?php echo $description[0]['title']?><br/>
            <?php echo $description[1]['title']?></span>
        </div>
    </header>
    <article>
        <?php echo $description['content']?>
    </article>
    <ol>
        <li class="flex-wrapper">
            <p>&nbsp;&nbsp;1、</p>
            <p class="flex-1">关注下方二维码公众号，点击右上角分享测试至朋友圈，即可获得<strong style="color: red">一次抽奖机会</strong>（有惊喜哦）。</p>
        </li>
        <li class="flex-wrapper">
            <p>&nbsp;&nbsp;2、</p>
            <p class="flex-1">点击人物，可随即获得优惠券一张。</p>
        </li>
        <li class="flex-wrapper">
            <p>&nbsp;&nbsp;3、</p>
            <p class="flex-1">本活动解释权归芝士妈妈所有。</p>
        </li>
    </ol>
    <div class="follow">
        <img src="/willbe/img/followCode.png" alt="芝士妈妈" />
    </div>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">
    Zepto(function ($) {
        wx.config({
            debug: false,
            appId: '<?php echo $js_config['appId']?>',
            timestamp: <?php echo $js_config['timestamp']?>,
            nonceStr: '<?php echo $js_config['noncestr']?>',
            signature: '<?php echo $js_config['signature']?>',
            jsApiList: [
            	'onMenuShareTimeline',
            	'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
            // 扫描二维码并返回结果
        	wx.onMenuShareTimeline({
        	    title: 'WOW！我的孩子原来是<?php echo $description[0]['title'].$description[1]['title']?>的后裔 ，快来测测你家的宝贝吧！', // 分享标题
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: '<?php echo $description['icon']?>', // 分享图标
        	    success: function () { 
        	        // 用户确认分享后执行的回调函数
					window.location.href = "/activity/docoupon";
        	    },
        	    cancel: function () { 
        	        // 用户取消分享后执行的回调函数
        	    }
        	});

        	wx.onMenuShareAppMessage({
        	    title: '快来测测你家的宝贝是谁的后裔吧！', // 分享标题
        	    desc: 'WOW！我的孩子原来是<?php echo $description[0]['title'].$description[1]['title']?>的后裔，快来测测你家的宝贝吧！', // 分享描述
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: '<?php echo $description['icon']?>', // 分享图标
        	    type: 'link', // 分享类型,music、video或link，不填默认为link
        	    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        	    success: function () { 
        	        // 用户确认分享后执行的回调函数
        	    },
        	    cancel: function () { 
        	        // 用户取消分享后执行的回调函数
        	    }
        	});
        });
    })
    </script>
</body>
</html>

